package com.powerbank.common.event.user;

import com.powerbank.common.event.BaseEvent;

/**
 * 用户注册事件
 */
public class UserRegisteredEvent extends BaseEvent {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 手机号
     */
    private String phone;
    
    /**
     * 邀请码
     */
    private String inviteCode;
    
    /**
     * 注册渠道
     */
    private String registerChannel;
    
    /**
     * 用户昵称
     */
    private String nickname;
    
    /**
     * 设备信息
     */
    private String deviceInfo;
    
    public UserRegisteredEvent() {
        super();
    }
    
    public UserRegisteredEvent(Long userId, String phone, String registerChannel) {
        super("USER_REGISTERED", "user-center");
        this.userId = userId;
        this.phone = phone;
        this.registerChannel = registerChannel;
    }
    
    // Getters and Setters
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public String getPhone() {
        return phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    public String getInviteCode() {
        return inviteCode;
    }
    
    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }
    
    public String getRegisterChannel() {
        return registerChannel;
    }
    
    public void setRegisterChannel(String registerChannel) {
        this.registerChannel = registerChannel;
    }
    
    public String getNickname() {
        return nickname;
    }
    
    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    
    public String getDeviceInfo() {
        return deviceInfo;
    }
    
    public void setDeviceInfo(String deviceInfo) {
        this.deviceInfo = deviceInfo;
    }
    
    @Override
    public String toString() {
        return "UserRegisteredEvent{" +
                "userId=" + userId +
                ", phone='" + phone + '\'' +
                ", inviteCode='" + inviteCode + '\'' +
                ", registerChannel='" + registerChannel + '\'' +
                ", nickname='" + nickname + '\'' +
                ", deviceInfo='" + deviceInfo + '\'' +
                "} " + super.toString();
    }
}